package com.hrzyit.whistle.comm.service.impl

import com.hrzyit.base.ext.convert
import com.hrzyit.whistle.comm.data.bean.ContactEntity
import com.hrzyit.whistle.comm.data.bean.DepartmentEntity
import com.hrzyit.whistle.comm.data.repository.ContactCenterRepository
import com.hrzyit.whistle.comm.service.IContactsService
import io.reactivex.Observable
import javax.inject.Inject


/**
 * 联络人 Service 接口实现类
 * @author YangWei
 * @date 2019/5/6
 */
class ContactsServiceImpl @Inject constructor() : IContactsService {

    @Inject
    lateinit var contactCenterRepository: ContactCenterRepository

    override fun selectContactsList(deptId: Long): Observable<MutableList<ContactEntity>> {
        return contactCenterRepository.selectContactsList(deptId).convert()
    }

    override fun getContactUserDetail(userId: Long): Observable<ContactEntity> {
        return contactCenterRepository.getContactUserDetail(userId).convert()
    }
}